package com.ruoyi.business.mapper;

import java.util.Date;
import java.util.List;
import com.ruoyi.business.domain.AnnualWorkDays;
import org.apache.ibatis.annotations.Delete;

/**
 * 全年出班天数Mapper接口
 * 
 * @author ruoyi
 * @date 2024-11-17
 */
public interface AnnualWorkDaysMapper 
{
    /**
     * 查询全年出班天数
     * 
     * @param id 全年出班天数主键
     * @return 全年出班天数
     */
    public AnnualWorkDays selectAnnualWorkDaysById(Long id);

    /**
     * 查询全年出班天数列表
     * 
     * @param annualWorkDays 全年出班天数
     * @return 全年出班天数集合
     */
    public List<AnnualWorkDays> selectAnnualWorkDaysList(AnnualWorkDays annualWorkDays);

    /**
     * 新增全年出班天数
     * 
     * @param annualWorkDays 全年出班天数
     * @return 结果
     */
    public int insertAnnualWorkDays(AnnualWorkDays annualWorkDays);

    /**
     * 修改全年出班天数
     * 
     * @param annualWorkDays 全年出班天数
     * @return 结果
     */
    public int updateAnnualWorkDays(AnnualWorkDays annualWorkDays);

    /**
     * 删除全年出班天数
     * 
     * @param id 全年出班天数主键
     * @return 结果
     */
    public int deleteAnnualWorkDaysById(Long id);

    /**
     * 批量删除全年出班天数
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteAnnualWorkDaysByIds(Long[] ids);

    @Delete("DELETE FROM t_annual_Work_Days")
    void clearTable();

    @Delete("DELETE FROM t_annual_Work_Days WHERE DATE_FORMAT(award_year, '%Y') = DATE_FORMAT(#{awd}, '%Y')")
    void clearTableYear(Date awd);
}
